import { http } from '@/utils/http/axios';

/**
 * @description: 角色列表
 */
export function rolePage(params) {
  return http.request({
    url: '/moss-cloud-base/base/sysRole/rolePage',
    method: 'POST',
    data:params,
  });
}

/**
 * @description: 保存角色
 */
export function saveRole(params) {
  return http.request({
    url: '/moss-cloud-base/base/sysRole/addRole',
    method: 'POST',
    data:params,
  }, {
    isTransformResponse: false,
  });
}

/**
 * @description: 修改角色
 */
export function updateRole(params) {
  return http.request({
    url: '/moss-cloud-base/base/sysRole/updateRole',
    method: 'POST',
    data:params,
  }, {
    isTransformResponse: false,
  });
}

/**
 * @description: 删除角色
 */
export function deleteRole(params) {
  return http.request({
    url: '/moss-cloud-base/base/sysRole/removeRole',
    method: 'POST',
    data:params,
  }, {
    isTransformResponse: false,
  });
}
/**
 * @description: 角色批量授权菜单
 */
export function roleAuthMenus(params) {
  return http.request({
    url: '/moss-cloud-base/base/sysRoleMenu/roleAuthMenus',
    method: 'POST',
    data:params,
  }, {
    isTransformResponse: false,
  });
}